<template>
  <el-dialog
    v-model="dialogOverflowVisible"
    title="新增用户"
    width="660"
    draggable
    overflow
  >
    <el-form
      :inline="true"
      :model="userFormdata"
      label-width="60px"
      class="demo-form-inline"
    >
      <el-form-item label="用户名:" label-position="right">
        <el-input
          v-model="userFormdata.useName"
          placeholder="请输入用户名"
          clearable
        />
      </el-form-item>
      <el-form-item label="角色:" label-position="right">
        <el-select
          v-model="userFormdata.role"
          placeholder="请输入角色"
          clearable
        >
          <el-option label="总经理" value="beijing" />
          <el-option label="经办人" value="beijing" />
          <el-option label="财务人员" value="beijing" />
          <el-option label="造价主任" value="beijing" />
          <el-option label="系统管理" value="beijing" />
          <el-option label="档案管理员" value="shanghai" />
          <el-option label="办公室印章管理员" value="beijing" />
        </el-select>
      </el-form-item>

      <el-form-item label="电话:" label-position="right">
        <el-input
          v-model="userFormdata.telNumber"
          placeholder="请输电话"
          clearable
        />
      </el-form-item>
    </el-form>
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="dialogOverflowVisible = false">Cancel</el-button>
        <el-button type="primary" @click="dialogOverflowVisible = false">
          Confirm
        </el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script lang="ts" setup>
import { ref } from "vue";
defineOptions({
  name: "AddUserModal"
});

const dialogOverflowVisible = ref(false);

const userFormdata = ref({
  useName: "",
  role: "",
  telNumber: ""
});

defineExpose({ dialogOverflowVisible });
</script>

<style scoped>
.demo-form-inline .el-input {
  --el-input-width: 220px;
}

.demo-form-inline .el-select {
  --el-select-width: 220px;
}
</style>
